package com.bdqn.controller;

import com.bdqn.pojo.SysCheckItem;
import com.bdqn.service.SysCheckItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("sci")
public class SysCheckItemController {
    @Autowired
    SysCheckItemService sysCheckItemService;
    @GetMapping("selectAll")
    public List<SysCheckItem> selectAll(String checkItemName, String keywords, String status){
        List<SysCheckItem> list=sysCheckItemService.selectAll(checkItemName,keywords,status);
        return list;
    }
    @PostMapping("update")
    public int update(@RequestBody SysCheckItem form){
        int r=sysCheckItemService.update(form);
        return r;
    }
    @PostMapping("insert")
    public int insert(@RequestBody SysCheckItem form){
        int r=sysCheckItemService.insert(form);
        return r;
    }
}
